package com.blog.dazi.Controller;

import com.blog.dazi.Service.HistoryService;
import com.blog.dazi.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/dazi/history")
public class HistoryController {
    @Autowired
    private HistoryService historyService;

    @GetMapping("findByTel")
    public List<Map<String,Object>> findByTel(String tel){
        return historyService.findByTel(tel);
    }

    @GetMapping("save")
    public int save(String tel,String tag){
        return historyService.save(tel,tag);

    }
}
